import org.sparkle.html.impl.basic.Div;
import org.sparkle.html.impl.basic.Head;
import org.sparkle.html.impl.basic.Head.DefaultScript;
import org.sparkle.html.impl.basic.Head.DefaultStyle;
import org.sparkle.html.impl.basic.Html;
import org.sparkle.html.impl.basic.Head.Meta;
import org.sparkle.html.impl.basic.Script;
import org.sparkle.html.impl.basic.Style;
import org.sparkle.web.page.AbstractPage

class Init extends AbstractPage {

	@Override
	public Object render() {
		
		String context="/sparkle";
		
		Meta m=new Meta();
		m.addAttr("name", "viewport");
		m.addAttr("content", "width=device-width, initial-scale=1.0");
		
		getHtml().getHead().append(m);// DefaultScript("/static/js/jquery-1.9.1.js"));
		
		getHtml().getHead().addStyleFile(context+"/template/static/css/bootstrap.css");
		getHtml().getHead().addStyleFile(context+"/template/static/css/bootstrap-responsive.css");
		
		DefaultStyle less=new DefaultStyle();
		less.addAttr("rel","stylesheet/less");
		less.addAttr("href",context+"/template/static/css/style.less");
		
		getHtml().getHead().append(less);
		
		
		Div pageContainer=new Div();
		pageContainer.setId("page-container");
		pageContainer.setClassStyle("container-fluid");
		
		Div loading=new Div();
		loading.setId("loading");
		
		pageContainer.append(loading);
		
		getHtml().getBody().append(pageContainer);
		
		getHtml().getBody().append(new DefaultScript(context+"/template/static/js/jquery-1.10.1.js"));
		getHtml().getBody().append(new DefaultScript(context+"/template/static/js/jquery-migrate-1.2.1.js"));
		getHtml().getBody().append(new DefaultScript(context+"/template/static/js/less-1.3.3.min.js"));
		getHtml().getBody().append(new DefaultScript(context+"/template/static/js/bootstrap.js"));
		//getHtml().getBody().append(new DefaultScript(context+"/template/static/js/tinymce/tinymce.min.js"));
		getHtml().getBody().append(new DefaultScript(context+"/template/static/js/ace/ace.js"));
		getHtml().getBody().append(new DefaultScript(context+"/template/static/js/internal.js"));
		
		return getHtml();
		
	}

}